package com.huikaka.util;

import com.huikaka.entity.User;
import com.huikaka.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.UUID;
public class UniqueInviteCodeUtile {

    @Autowired
    private UserService userService;

    public String getOneCode() {
        // 邀请码
        String testCode = null;
        // 生成一个六位邀请码,小写字母换成大写
        testCode = UUID.randomUUID().toString().replace("-", "").substring(0, 6).toUpperCase();
        return testCode;
    }
}
